﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsReportsMLY" targetNamespace="http://tempuri.org/dsReportsMLY.xsd" xmlns:mstns="http://tempuri.org/dsReportsMLY.xsd" xmlns="http://tempuri.org/dsReportsMLY.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="MLYConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="MLYConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.MLYConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableWorkOrdersTableAdapter" GeneratorDataComponentClassName="TableWorkOrdersTableAdapter" Name="TableWorkOrders" UserDataComponentName="TableWorkOrdersTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId, TableWorkOrder.ContractorCatalogueCode
FROM            TableOrganizations ,
                         TableWorkOrder </CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="OrganizationName" DataSetColumn="OrganizationName" />
              <Mapping SourceColumn="CustomerWorkOrderNumber" DataSetColumn="CustomerWorkOrderNumber" />
              <Mapping SourceColumn="Quantity" DataSetColumn="Quantity" />
              <Mapping SourceColumn="CustomerCatalougeCode" DataSetColumn="CustomerCatalougeCode" />
              <Mapping SourceColumn="ProductDescription" DataSetColumn="ProductDescription" />
              <Mapping SourceColumn="TextFieldA" DataSetColumn="TextFieldA" />
              <Mapping SourceColumn="TextFieldB" DataSetColumn="TextFieldB" />
              <Mapping SourceColumn="OrderNumber" DataSetColumn="OrderNumber" />
              <Mapping SourceColumn="TotalSum" DataSetColumn="TotalSum" />
              <Mapping SourceColumn="ContractorWorkOrderNumber" DataSetColumn="ContractorWorkOrderNumber" />
              <Mapping SourceColumn="ContractorLotNumber" DataSetColumn="ContractorLotNumber" />
              <Mapping SourceColumn="SendDate" DataSetColumn="SendDate" />
              <Mapping SourceColumn="RequestedDelivaryDate" DataSetColumn="RequestedDelivaryDate" />
              <Mapping SourceColumn="PlannedDelivaryDate" DataSetColumn="PlannedDelivaryDate" />
              <Mapping SourceColumn="ActualDelivaryDate" DataSetColumn="ActualDelivaryDate" />
              <Mapping SourceColumn="CustomerPriority" DataSetColumn="CustomerPriority" />
              <Mapping SourceColumn="Remarks" DataSetColumn="Remarks" />
              <Mapping SourceColumn="CustomerId" DataSetColumn="CustomerId" />
              <Mapping SourceColumn="ContractorId" DataSetColumn="ContractorId" />
              <Mapping SourceColumn="ContractorCatalogueCode" DataSetColumn="ContractorCatalogueCode" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillCancelledWOContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataCancelledWOContractor" GeneratorSourceName="FillCancelledWOContractor" GetMethodModifier="Public" GetMethodName="GetDataCancelledWOContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataCancelledWOContractor" UserSourceName="FillCancelledWOContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.CustomerId
WHERE        (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND 
                         (TableWorkOrder.ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (TableWorkOrder.Quantity &gt; 0) OR
                         (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND 
                         (TableWorkOrder.Quantity &gt; 0) AND (@CustomerId = 0)
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillCancelledWOCustomer" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataCancelledWOCustomer" GeneratorSourceName="FillCancelledWOCustomer" GetMethodModifier="Public" GetMethodName="GetDataCancelledWOCustomer" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataCancelledWOCustomer" UserSourceName="FillCancelledWOCustomer">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND 
                         (TableWorkOrder.ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (TableWorkOrder.Quantity &gt; 0) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND 
                         (TableWorkOrder.Quantity &gt; 0) AND (@ContractorId = 0)
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillInventoryByOrgIdContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataInventoryByOrgIdContractor" GeneratorSourceName="FillInventoryByOrgIdContractor" GetMethodModifier="Public" GetMethodName="GetDataInventoryByOrgIdContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataInventoryByOrgIdContractor" UserSourceName="FillInventoryByOrgIdContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.CustomerId
WHERE        (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND 
                         (TableWorkOrder.Quantity &gt; 0) OR
                         (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.ContractorId = @ContractorId) AND (@CustomerId = 0) AND 
                         (TableWorkOrder.Quantity &gt; 0)
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillInventoryByOrgIdCustomer" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataInventoryByOrgIdCustomer" GeneratorSourceName="FillInventoryByOrgIdCustomer" GetMethodModifier="Public" GetMethodName="GetDataInventoryByOrgIdCustomer" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataInventoryByOrgIdCustomer" UserSourceName="FillInventoryByOrgIdCustomer">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND 
                         (TableWorkOrder.Quantity &gt; 0) OR
                         (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.CustomerId = @CustomerId) AND (@ContractorId = 0) AND (TableWorkOrder.Quantity &gt; 0)
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillLateWOContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetLateWOContractor" GeneratorSourceName="FillLateWOContractor" GetMethodModifier="Public" GetMethodName="GetLateWOContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetLateWOContractor" UserSourceName="FillLateWOContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.CustomerId
WHERE        (NOT (TableWorkOrder.ActualDelivaryDate IS NULL)) AND (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) 
                         AND (TableWorkOrder.Quantity &gt; 0) AND (TableWorkOrder.PlannedDelivaryDate &lt;= TableWorkOrder.ActualDelivaryDate) AND 
                         (TableWorkOrder.ActualDelivaryDate &lt;&gt; CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) OR
                         (NOT (TableWorkOrder.ActualDelivaryDate IS NULL)) AND (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.Quantity &gt; 0) AND 
                         (TableWorkOrder.PlannedDelivaryDate &lt;= TableWorkOrder.ActualDelivaryDate) AND (TableWorkOrder.ActualDelivaryDate &lt;&gt; CONVERT(DATETIME, 
                         '2099-01-01 00:00:00', 102)) AND (@CustomerId = 0)
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillLateWOCustomer" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetLateWOCustomer" GeneratorSourceName="FillLateWOCustomer" GetMethodModifier="Public" GetMethodName="GetLateWOCustomer" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetLateWOCustomer" UserSourceName="FillLateWOCustomer">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND (NOT (TableWorkOrder.ActualDelivaryDate IS NULL)) 
                         AND (TableWorkOrder.Quantity &gt; 0) AND (TableWorkOrder.PlannedDelivaryDate &lt;= TableWorkOrder.ActualDelivaryDate) AND 
                         (TableWorkOrder.ActualDelivaryDate &lt;&gt; CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (NOT (TableWorkOrder.ActualDelivaryDate IS NULL)) AND (TableWorkOrder.Quantity &gt; 0) AND 
                         (TableWorkOrder.PlannedDelivaryDate &lt;= TableWorkOrder.ActualDelivaryDate) AND (TableWorkOrder.ActualDelivaryDate &lt;&gt; CONVERT(DATETIME, 
                         '2099-01-01 00:00:00', 102)) AND (@ContractorId = 0)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillOpenLateWOContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataLateWOContractor" GeneratorSourceName="FillOpenLateWOContractor" GetMethodModifier="Public" GetMethodName="GetDataLateWOContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataLateWOContractor" UserSourceName="FillOpenLateWOContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.CustomerId
WHERE        (TableWorkOrder.PlannedDelivaryDate &lt; GETDATE()) AND (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) 
                         AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.Quantity &gt; 0) AND (@ByPlanned = 1) OR
                         (TableWorkOrder.PlannedDelivaryDate &lt; GETDATE()) AND (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) 
                         AND (TableWorkOrder.Quantity &gt; 0) AND (@CustomerId = 0) AND (@ByPlanned = 1) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND 
                         (TableWorkOrder.Quantity &gt; 0) AND (@ByPlanned = 0) AND (TableWorkOrder.RequestedDelivaryDate &lt; GETDATE()) OR
                         (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.Quantity &gt; 0) AND 
                         (@CustomerId = 0) AND (@ByPlanned = 0) AND (TableWorkOrder.RequestedDelivaryDate &lt; GETDATE())
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="ByPlanned" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@ByPlanned" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillOpenLateWOCustomers" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GeLateWOCustomers" GeneratorSourceName="FillOpenLateWOCustomers" GetMethodModifier="Public" GetMethodName="GeLateWOCustomers" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GeLateWOCustomers" UserSourceName="FillOpenLateWOCustomers">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND 
                         (TableWorkOrder.Quantity &gt; 0) AND (TableWorkOrder.PlannedDelivaryDate &lt; GETDATE()) AND (@ByPlanned = 1) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.Quantity &gt; 0) AND 
                         (TableWorkOrder.PlannedDelivaryDate &lt; GETDATE()) AND (@ByPlanned = 1) AND (@ContractorId = 0) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND 
                         (TableWorkOrder.Quantity &gt; 0) AND (@ByPlanned = 0) AND (TableWorkOrder.RequestedDelivaryDate &lt; GETDATE()) OR
                         (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.ActualDelivaryDate IS NULL) AND (TableWorkOrder.Quantity &gt; 0) AND (@ByPlanned = 0) 
                         AND (@ContractorId = 0) AND (TableWorkOrder.RequestedDelivaryDate &lt; GETDATE())
ORDER BY TableOrganizations.OrganizationName, TableWorkOrder.SendDate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MlyTest2.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MlyTest2.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="ByPlanned" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@ByPlanned" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableOrganizationTableAdapter" GeneratorDataComponentClassName="TableOrganizationTableAdapter" Name="TableOrganization" UserDataComponentName="TableOrganizationTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillContractorsDetailsForClient" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetContractorsDetailsForClient" GeneratorSourceName="FillContractorsDetailsForClient" GetMethodModifier="Public" GetMethodName="GetContractorsDetailsForClient" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetContractorsDetailsForClient" UserSourceName="FillContractorsDetailsForClient">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizationRelations.ContractorId, TableOrganizations.OrganizationName, TableOrganizations.Address, TableOrganizations.ContactPerson, 
                         TableOrganizations.ContactPersonPhone, TableOrganizations.ContactPersonEmail, TableOrganizations.Tag, TableOrganizations.ProffessionDescription, 
                         TableOrganizations.WebSite, TableOrganizationRelations.CustomerId
FROM            TableOrganizations INNER JOIN
                         TableOrganizationRelations ON TableOrganizations.OrganizationId = TableOrganizationRelations.ContractorId
WHERE        (TableOrganizationRelations.CustomerId = @CustomerId) AND (TableOrganizationRelations.ContractorId = @ContractorId) OR
                         (TableOrganizationRelations.CustomerId = @CustomerId) AND (@ContractorId = 0) OR
                         (TableOrganizationRelations.ContractorId = @ContractorId) AND (@CustomerId = 0) OR
                         (@ContractorId = 0) AND (@CustomerId = 0)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableOrganizationRelations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableOrganizationRelations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ContractorId" DataSetColumn="ContractorId" />
              <Mapping SourceColumn="OrganizationName" DataSetColumn="OrganizationName" />
              <Mapping SourceColumn="Address" DataSetColumn="Address" />
              <Mapping SourceColumn="ContactPerson" DataSetColumn="ContactPerson" />
              <Mapping SourceColumn="ContactPersonPhone" DataSetColumn="ContactPersonPhone" />
              <Mapping SourceColumn="ContactPersonEmail" DataSetColumn="ContactPersonEmail" />
              <Mapping SourceColumn="Tag" DataSetColumn="Tag" />
              <Mapping SourceColumn="ProffessionDescription" DataSetColumn="ProffessionDescription" />
              <Mapping SourceColumn="WebSite" DataSetColumn="WebSite" />
              <Mapping SourceColumn="CustomerId" DataSetColumn="CustomerId" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillCustomersDetailsForContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetCustomersDetailsForContractor" GeneratorSourceName="FillCustomersDetailsForContractor" GetMethodModifier="Public" GetMethodName="GetCustomersDetailsForContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetCustomersDetailsForContractor" UserSourceName="FillCustomersDetailsForContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizationRelations.CustomerId, TableOrganizations.OrganizationName, TableOrganizations.Address, TableOrganizations.ContactPerson, 
                         TableOrganizations.ContactPersonPhone, TableOrganizations.ContactPersonEmail, TableOrganizations.Tag, TableOrganizations.ProffessionDescription, 
                         TableOrganizations.WebSite, TableOrganizationRelations.CustomerId AS Expr1
FROM            TableOrganizations INNER JOIN
                         TableOrganizationRelations ON TableOrganizations.OrganizationId = TableOrganizationRelations.CustomerId
WHERE        (TableOrganizationRelations.CustomerId = @CustomerId) AND (TableOrganizationRelations.ContractorId = @ContractorId) OR
                         (TableOrganizationRelations.CustomerId = @CustomerId) AND (@ContractorId = 0) OR
                         (TableOrganizationRelations.ContractorId = @ContractorId) AND (@CustomerId = 0) OR
                         (@ContractorId = 0) AND (@CustomerId = 0)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableOrganizationRelations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MLY.dbo.TableOrganizationRelations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableWorkOrdersContractorsTableAdapter" GeneratorDataComponentClassName="TableWorkOrdersContractorsTableAdapter" Name="TableWorkOrdersContractors" UserDataComponentName="TableWorkOrdersContractorsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="OrganizationName" DataSetColumn="OrganizationName" />
              <Mapping SourceColumn="CustomerWorkOrderNumber" DataSetColumn="CustomerWorkOrderNumber" />
              <Mapping SourceColumn="Quantity" DataSetColumn="Quantity" />
              <Mapping SourceColumn="CustomerCatalougeCode" DataSetColumn="CustomerCatalougeCode" />
              <Mapping SourceColumn="ProductDescription" DataSetColumn="ProductDescription" />
              <Mapping SourceColumn="TextFieldA" DataSetColumn="TextFieldA" />
              <Mapping SourceColumn="TextFieldB" DataSetColumn="TextFieldB" />
              <Mapping SourceColumn="OrderNumber" DataSetColumn="OrderNumber" />
              <Mapping SourceColumn="TotalSum" DataSetColumn="TotalSum" />
              <Mapping SourceColumn="ContractorWorkOrderNumber" DataSetColumn="ContractorWorkOrderNumber" />
              <Mapping SourceColumn="ContractorLotNumber" DataSetColumn="ContractorLotNumber" />
              <Mapping SourceColumn="SendDate" DataSetColumn="SendDate" />
              <Mapping SourceColumn="RequestedDelivaryDate" DataSetColumn="RequestedDelivaryDate" />
              <Mapping SourceColumn="PlannedDelivaryDate" DataSetColumn="PlannedDelivaryDate" />
              <Mapping SourceColumn="ActualDelivaryDate" DataSetColumn="ActualDelivaryDate" />
              <Mapping SourceColumn="CustomerPriority" DataSetColumn="CustomerPriority" />
              <Mapping SourceColumn="Remarks" DataSetColumn="Remarks" />
              <Mapping SourceColumn="CustomerId" DataSetColumn="CustomerId" />
              <Mapping SourceColumn="ContractorId" DataSetColumn="ContractorId" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillInventoryByOrgIdContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataInventoryByOrgIdContractor" GeneratorSourceName="FillInventoryByOrgIdContractor" GetMethodModifier="Public" GetMethodName="GetDataInventoryByOrgIdContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataInventoryByOrgIdContractor" UserSourceName="FillInventoryByOrgIdContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableOrganizations.OrganizationId = @OrgId) AND (TableOrganizations.IsContractor = 1) AND (TableWorkOrder.ActualDelivaryDate &lt;= GETDATE()) OR
                         (TableOrganizations.IsContractor = 1) AND (TableWorkOrder.ActualDelivaryDate &lt;= GETDATE()) AND (@OrgId = 0)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="OrgId" ColumnName="OrganizationId" DataSourceName="MLY.dbo.TableOrganizations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@OrgId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="OrganizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillLateWOContractors" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataLateWOContractors" GeneratorSourceName="FillLateWOContractors" GetMethodModifier="Public" GetMethodName="GetDataLateWOContractors" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataLateWOContractors" UserSourceName="FillLateWOContractors">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableOrganizations.OrganizationName, TableWorkOrder.CustomerWorkOrderNumber, TableWorkOrder.Quantity, TableWorkOrder.CustomerCatalougeCode, 
                         TableWorkOrder.ProductDescription, TableWorkOrder.TextFieldA, TableWorkOrder.TextFieldB, TableWorkOrder.OrderNumber, TableWorkOrder.TotalSum, 
                         TableWorkOrder.ContractorWorkOrderNumber, TableWorkOrder.ContractorLotNumber, TableWorkOrder.SendDate, TableWorkOrder.RequestedDelivaryDate, 
                         TableWorkOrder.PlannedDelivaryDate, TableWorkOrder.ActualDelivaryDate, TableWorkOrder.CustomerPriority, TableWorkOrder.Remarks, 
                         TableWorkOrder.CustomerId, TableWorkOrder.ContractorId
FROM            TableOrganizations INNER JOIN
                         TableWorkOrder ON TableOrganizations.OrganizationId = TableWorkOrder.ContractorId
WHERE        (TableOrganizations.OrganizationId = @OrgId) AND (TableOrganizations.IsContractor = 1) AND 
                         (TableWorkOrder.PlannedDelivaryDate &lt; TableWorkOrder.ActualDelivaryDate) OR
                         (TableOrganizations.IsContractor = 1) AND (TableWorkOrder.PlannedDelivaryDate &lt; TableWorkOrder.ActualDelivaryDate) AND (@OrgId = 0)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="OrgId" ColumnName="OrganizationId" DataSourceName="MLY.dbo.TableOrganizations" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@OrgId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="OrganizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="logTblTableAdapter" GeneratorDataComponentClassName="logTblTableAdapter" Name="logTbl" UserDataComponentName="logTblTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectName="MLY.dbo.logTbl" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [logTbl] WHERE (([Idx] = @Original_Idx))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Idx" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Idx" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [logTbl] ([Message], [timeReceived], [Idx]) VALUES (@Message, @timeReceived, @Idx)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Message" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Message" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@timeReceived" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="timeReceived" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Idx" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Idx" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT Message, timeReceived, Idx FROM logTbl </CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [logTbl] SET [Message] = @Message, [timeReceived] = @timeReceived, [Idx] = @Idx WHERE (([Idx] = @Original_Idx))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Message" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Message" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@timeReceived" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="timeReceived" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Idx" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Idx" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Idx" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Idx" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Message" DataSetColumn="Message" />
              <Mapping SourceColumn="timeReceived" DataSetColumn="timeReceived" />
              <Mapping SourceColumn="Idx" DataSetColumn="Idx" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectName="MLY.dbo.logTbl" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillErrLogByDates" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetErrLogByDates" GeneratorSourceName="FillErrLogByDates" GetMethodModifier="Public" GetMethodName="GetErrLogByDates" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetErrLogByDates" UserSourceName="FillErrLogByDates">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT Idx, Message, timeReceived FROM logTbl WHERE (isError = 1) AND (timeReceived BETWEEN @DataFrom AND @DateTo)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="DataFrom" ColumnName="timeReceived" DataSourceName="MLY.dbo.logTbl" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataFrom" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="timeReceived" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="DateTo" ColumnName="timeReceived" DataSourceName="MLY.dbo.logTbl" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DateTo" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="timeReceived" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableCanceledWoTableAdapter" GeneratorDataComponentClassName="TableCanceledWoTableAdapter" Name="TableCanceledWo" UserDataComponentName="TableCanceledWoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillCanceledWorkOrders" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetCanceledWorkOrders" GeneratorSourceName="FillCanceledWorkOrders" GetMethodModifier="Public" GetMethodName="GetCanceledWorkOrders" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetCanceledWorkOrders" UserSourceName="FillCanceledWorkOrders">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableWorkOrder.ContractorId, TableOrganizations.OrganizationName, SUM(CASE WHEN ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 
                         102) THEN 1 ELSE 0 END) AS CanceledWo, SUM(CASE WHEN ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102) 
                         THEN Quantity ELSE 0 END) AS CanceledWoQunatity, COUNT(TableWorkOrder.WorkOrderId) AS CountWo, SUM(TableWorkOrder.Quantity) 
                         AS SunOfQuantity
FROM            TableWorkOrder LEFT OUTER JOIN
                         TableOrganizations ON TableWorkOrder.ContractorId = TableOrganizations.OrganizationId
WHERE        (TableWorkOrder.CustomerId = @CustomerId) AND (TableWorkOrder.Quantity &lt;&gt; 0)
GROUP BY TableWorkOrder.ContractorId, TableOrganizations.OrganizationName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CustomerId" ColumnName="CustomerId" DataSourceName="MLY.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ContractorId" DataSetColumn="ContractorId" />
              <Mapping SourceColumn="OrganizationName" DataSetColumn="OrganizationName" />
              <Mapping SourceColumn="CanceledWo" DataSetColumn="CanceledWo" />
              <Mapping SourceColumn="CountWo" DataSetColumn="CountWo" />
              <Mapping SourceColumn="CanceledWoQunatity" DataSetColumn="CanceledWoQunatity" />
              <Mapping SourceColumn="SunOfQuantity" DataSetColumn="SunOfQuantity" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="MLYConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillCancelledWoContractor" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataCancelledWoContractor" GeneratorSourceName="FillCancelledWoContractor" GetMethodModifier="Public" GetMethodName="GetDataCancelledWoContractor" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataCancelledWoContractor" UserSourceName="FillCancelledWoContractor">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TableWorkOrder.ContractorId, TableOrganizations.OrganizationName, SUM(CASE WHEN ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 
                         102) THEN 1 ELSE 0 END) AS CanceledWo, SUM(CASE WHEN ActualDelivaryDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102) 
                         THEN Quantity ELSE 0 END) AS CanceledWoQunatity, COUNT(TableWorkOrder.WorkOrderId) AS CountWo, SUM(TableWorkOrder.Quantity) 
                         AS SunOfQuantity
FROM            TableWorkOrder INNER JOIN
                         TableOrganizations ON TableWorkOrder.CustomerId = TableOrganizations.OrganizationId
WHERE        (TableWorkOrder.ContractorId = @ContractorId) AND (TableWorkOrder.Quantity &gt; 0)
GROUP BY TableWorkOrder.ContractorId, TableOrganizations.OrganizationName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="ContractorId" ColumnName="ContractorId" DataSourceName="MlyTest2.dbo.TableWorkOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContractorId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContractorId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsReportsMLY" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="dsReportsMLY" msprop:Generator_DataSetName="dsReportsMLY" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="TableWorkOrders" msprop:Generator_UserTableName="TableWorkOrders" msprop:Generator_RowDeletedName="TableWorkOrdersRowDeleted" msprop:Generator_RowChangedName="TableWorkOrdersRowChanged" msprop:Generator_RowClassName="TableWorkOrdersRow" msprop:Generator_RowChangingName="TableWorkOrdersRowChanging" msprop:Generator_RowEvArgName="TableWorkOrdersRowChangeEvent" msprop:Generator_RowEvHandlerName="TableWorkOrdersRowChangeEventHandler" msprop:Generator_TableClassName="TableWorkOrdersDataTable" msprop:Generator_TableVarName="tableTableWorkOrders" msprop:Generator_RowDeletingName="TableWorkOrdersRowDeleting" msprop:Generator_TablePropName="TableWorkOrders">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="OrganizationName" msprop:Generator_UserColumnName="OrganizationName" msprop:Generator_ColumnVarNameInTable="columnOrganizationName" msprop:Generator_ColumnPropNameInRow="OrganizationName" msprop:Generator_ColumnPropNameInTable="OrganizationNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerWorkOrderNumber" msprop:Generator_UserColumnName="CustomerWorkOrderNumber" msprop:Generator_ColumnVarNameInTable="columnCustomerWorkOrderNumber" msprop:Generator_ColumnPropNameInRow="CustomerWorkOrderNumber" msprop:Generator_ColumnPropNameInTable="CustomerWorkOrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Quantity" msprop:Generator_UserColumnName="Quantity" msprop:Generator_ColumnVarNameInTable="columnQuantity" msprop:Generator_ColumnPropNameInRow="Quantity" msprop:Generator_ColumnPropNameInTable="QuantityColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="CustomerCatalougeCode" msprop:Generator_UserColumnName="CustomerCatalougeCode" msprop:Generator_ColumnVarNameInTable="columnCustomerCatalougeCode" msprop:Generator_ColumnPropNameInRow="CustomerCatalougeCode" msprop:Generator_ColumnPropNameInTable="CustomerCatalougeCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ProductDescription" msprop:Generator_UserColumnName="ProductDescription" msprop:Generator_ColumnVarNameInTable="columnProductDescription" msprop:Generator_ColumnPropNameInRow="ProductDescription" msprop:Generator_ColumnPropNameInTable="ProductDescriptionColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TextFieldA" msprop:Generator_UserColumnName="TextFieldA" msprop:Generator_ColumnVarNameInTable="columnTextFieldA" msprop:Generator_ColumnPropNameInRow="TextFieldA" msprop:Generator_ColumnPropNameInTable="TextFieldAColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TextFieldB" msprop:Generator_UserColumnName="TextFieldB" msprop:Generator_ColumnVarNameInTable="columnTextFieldB" msprop:Generator_ColumnPropNameInRow="TextFieldB" msprop:Generator_ColumnPropNameInTable="TextFieldBColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OrderNumber" msprop:Generator_UserColumnName="OrderNumber" msprop:Generator_ColumnVarNameInTable="columnOrderNumber" msprop:Generator_ColumnPropNameInRow="OrderNumber" msprop:Generator_ColumnPropNameInTable="OrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TotalSum" msprop:Generator_UserColumnName="TotalSum" msprop:Generator_ColumnVarNameInTable="columnTotalSum" msprop:Generator_ColumnPropNameInRow="TotalSum" msprop:Generator_ColumnPropNameInTable="TotalSumColumn" type="xs:double" minOccurs="0" />
              <xs:element name="ContractorWorkOrderNumber" msprop:Generator_UserColumnName="ContractorWorkOrderNumber" msprop:Generator_ColumnVarNameInTable="columnContractorWorkOrderNumber" msprop:Generator_ColumnPropNameInRow="ContractorWorkOrderNumber" msprop:Generator_ColumnPropNameInTable="ContractorWorkOrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContractorLotNumber" msprop:Generator_UserColumnName="ContractorLotNumber" msprop:Generator_ColumnVarNameInTable="columnContractorLotNumber" msprop:Generator_ColumnPropNameInRow="ContractorLotNumber" msprop:Generator_ColumnPropNameInTable="ContractorLotNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SendDate" msprop:Generator_UserColumnName="SendDate" msprop:Generator_ColumnVarNameInTable="columnSendDate" msprop:Generator_ColumnPropNameInRow="SendDate" msprop:Generator_ColumnPropNameInTable="SendDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="RequestedDelivaryDate" msprop:Generator_UserColumnName="RequestedDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnRequestedDelivaryDate" msprop:Generator_ColumnPropNameInRow="RequestedDelivaryDate" msprop:Generator_ColumnPropNameInTable="RequestedDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="PlannedDelivaryDate" msprop:Generator_UserColumnName="PlannedDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnPlannedDelivaryDate" msprop:Generator_ColumnPropNameInRow="PlannedDelivaryDate" msprop:Generator_ColumnPropNameInTable="PlannedDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ActualDelivaryDate" msprop:Generator_UserColumnName="ActualDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnActualDelivaryDate" msprop:Generator_ColumnPropNameInRow="ActualDelivaryDate" msprop:Generator_ColumnPropNameInTable="ActualDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CustomerPriority" msprop:Generator_UserColumnName="CustomerPriority" msprop:Generator_ColumnVarNameInTable="columnCustomerPriority" msprop:Generator_ColumnPropNameInRow="CustomerPriority" msprop:Generator_ColumnPropNameInTable="CustomerPriorityColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Remarks" msprop:Generator_UserColumnName="Remarks" msprop:Generator_ColumnVarNameInTable="columnRemarks" msprop:Generator_ColumnPropNameInRow="Remarks" msprop:Generator_ColumnPropNameInTable="RemarksColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerId" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContractorId" msprop:Generator_UserColumnName="ContractorId" msprop:Generator_ColumnVarNameInTable="columnContractorId" msprop:Generator_ColumnPropNameInRow="ContractorId" msprop:Generator_ColumnPropNameInTable="ContractorIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContractorCatalogueCode" msprop:Generator_UserColumnName="ContractorCatalogueCode" msprop:Generator_ColumnVarNameInTable="columnContractorCatalogueCode" msprop:Generator_ColumnPropNameInRow="ContractorCatalogueCode" msprop:Generator_ColumnPropNameInTable="ContractorCatalogueCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TableOrganization" msprop:Generator_UserTableName="TableOrganization" msprop:Generator_RowDeletedName="TableOrganizationRowDeleted" msprop:Generator_RowChangedName="TableOrganizationRowChanged" msprop:Generator_RowClassName="TableOrganizationRow" msprop:Generator_RowChangingName="TableOrganizationRowChanging" msprop:Generator_RowEvArgName="TableOrganizationRowChangeEvent" msprop:Generator_RowEvHandlerName="TableOrganizationRowChangeEventHandler" msprop:Generator_TableClassName="TableOrganizationDataTable" msprop:Generator_TableVarName="tableTableOrganization" msprop:Generator_RowDeletingName="TableOrganizationRowDeleting" msprop:Generator_TablePropName="TableOrganization">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ContractorId" msprop:Generator_UserColumnName="ContractorId" msprop:Generator_ColumnVarNameInTable="columnContractorId" msprop:Generator_ColumnPropNameInRow="ContractorId" msprop:Generator_ColumnPropNameInTable="ContractorIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="OrganizationName" msprop:Generator_UserColumnName="OrganizationName" msprop:Generator_ColumnVarNameInTable="columnOrganizationName" msprop:Generator_ColumnPropNameInRow="OrganizationName" msprop:Generator_ColumnPropNameInTable="OrganizationNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Address" msprop:Generator_UserColumnName="Address" msprop:Generator_ColumnVarNameInTable="columnAddress" msprop:Generator_ColumnPropNameInRow="Address" msprop:Generator_ColumnPropNameInTable="AddressColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContactPerson" msprop:Generator_UserColumnName="ContactPerson" msprop:Generator_ColumnVarNameInTable="columnContactPerson" msprop:Generator_ColumnPropNameInRow="ContactPerson" msprop:Generator_ColumnPropNameInTable="ContactPersonColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContactPersonPhone" msprop:Generator_UserColumnName="ContactPersonPhone" msprop:Generator_ColumnVarNameInTable="columnContactPersonPhone" msprop:Generator_ColumnPropNameInRow="ContactPersonPhone" msprop:Generator_ColumnPropNameInTable="ContactPersonPhoneColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContactPersonEmail" msprop:Generator_UserColumnName="ContactPersonEmail" msprop:Generator_ColumnVarNameInTable="columnContactPersonEmail" msprop:Generator_ColumnPropNameInRow="ContactPersonEmail" msprop:Generator_ColumnPropNameInTable="ContactPersonEmailColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Tag" msprop:Generator_UserColumnName="Tag" msprop:Generator_ColumnVarNameInTable="columnTag" msprop:Generator_ColumnPropNameInRow="Tag" msprop:Generator_ColumnPropNameInTable="TagColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ProffessionDescription" msprop:Generator_UserColumnName="ProffessionDescription" msprop:Generator_ColumnVarNameInTable="columnProffessionDescription" msprop:Generator_ColumnPropNameInRow="ProffessionDescription" msprop:Generator_ColumnPropNameInTable="ProffessionDescriptionColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="WebSite" msprop:Generator_UserColumnName="WebSite" msprop:Generator_ColumnVarNameInTable="columnWebSite" msprop:Generator_ColumnPropNameInRow="WebSite" msprop:Generator_ColumnPropNameInTable="WebSiteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerId" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TableWorkOrdersContractors" msprop:Generator_UserTableName="TableWorkOrdersContractors" msprop:Generator_RowDeletedName="TableWorkOrdersContractorsRowDeleted" msprop:Generator_RowChangedName="TableWorkOrdersContractorsRowChanged" msprop:Generator_RowClassName="TableWorkOrdersContractorsRow" msprop:Generator_RowChangingName="TableWorkOrdersContractorsRowChanging" msprop:Generator_RowEvArgName="TableWorkOrdersContractorsRowChangeEvent" msprop:Generator_RowEvHandlerName="TableWorkOrdersContractorsRowChangeEventHandler" msprop:Generator_TableClassName="TableWorkOrdersContractorsDataTable" msprop:Generator_TableVarName="tableTableWorkOrdersContractors" msprop:Generator_RowDeletingName="TableWorkOrdersContractorsRowDeleting" msprop:Generator_TablePropName="TableWorkOrdersContractors">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="OrganizationName" msprop:Generator_UserColumnName="OrganizationName" msprop:Generator_ColumnPropNameInRow="OrganizationName" msprop:Generator_ColumnVarNameInTable="columnOrganizationName" msprop:Generator_ColumnPropNameInTable="OrganizationNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerWorkOrderNumber" msprop:Generator_UserColumnName="CustomerWorkOrderNumber" msprop:Generator_ColumnPropNameInRow="CustomerWorkOrderNumber" msprop:Generator_ColumnVarNameInTable="columnCustomerWorkOrderNumber" msprop:Generator_ColumnPropNameInTable="CustomerWorkOrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Quantity" msprop:Generator_UserColumnName="Quantity" msprop:Generator_ColumnPropNameInRow="Quantity" msprop:Generator_ColumnVarNameInTable="columnQuantity" msprop:Generator_ColumnPropNameInTable="QuantityColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="CustomerCatalougeCode" msprop:Generator_UserColumnName="CustomerCatalougeCode" msprop:Generator_ColumnPropNameInRow="CustomerCatalougeCode" msprop:Generator_ColumnVarNameInTable="columnCustomerCatalougeCode" msprop:Generator_ColumnPropNameInTable="CustomerCatalougeCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ProductDescription" msprop:Generator_UserColumnName="ProductDescription" msprop:Generator_ColumnPropNameInRow="ProductDescription" msprop:Generator_ColumnVarNameInTable="columnProductDescription" msprop:Generator_ColumnPropNameInTable="ProductDescriptionColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TextFieldA" msprop:Generator_UserColumnName="TextFieldA" msprop:Generator_ColumnPropNameInRow="TextFieldA" msprop:Generator_ColumnVarNameInTable="columnTextFieldA" msprop:Generator_ColumnPropNameInTable="TextFieldAColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TextFieldB" msprop:Generator_UserColumnName="TextFieldB" msprop:Generator_ColumnPropNameInRow="TextFieldB" msprop:Generator_ColumnVarNameInTable="columnTextFieldB" msprop:Generator_ColumnPropNameInTable="TextFieldBColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OrderNumber" msprop:Generator_UserColumnName="OrderNumber" msprop:Generator_ColumnPropNameInRow="OrderNumber" msprop:Generator_ColumnVarNameInTable="columnOrderNumber" msprop:Generator_ColumnPropNameInTable="OrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TotalSum" msprop:Generator_UserColumnName="TotalSum" msprop:Generator_ColumnPropNameInRow="TotalSum" msprop:Generator_ColumnVarNameInTable="columnTotalSum" msprop:Generator_ColumnPropNameInTable="TotalSumColumn" type="xs:double" minOccurs="0" />
              <xs:element name="ContractorWorkOrderNumber" msprop:Generator_UserColumnName="ContractorWorkOrderNumber" msprop:Generator_ColumnPropNameInRow="ContractorWorkOrderNumber" msprop:Generator_ColumnVarNameInTable="columnContractorWorkOrderNumber" msprop:Generator_ColumnPropNameInTable="ContractorWorkOrderNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContractorLotNumber" msprop:Generator_UserColumnName="ContractorLotNumber" msprop:Generator_ColumnPropNameInRow="ContractorLotNumber" msprop:Generator_ColumnVarNameInTable="columnContractorLotNumber" msprop:Generator_ColumnPropNameInTable="ContractorLotNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SendDate" msprop:Generator_UserColumnName="SendDate" msprop:Generator_ColumnPropNameInRow="SendDate" msprop:Generator_ColumnVarNameInTable="columnSendDate" msprop:Generator_ColumnPropNameInTable="SendDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="RequestedDelivaryDate" msprop:Generator_UserColumnName="RequestedDelivaryDate" msprop:Generator_ColumnPropNameInRow="RequestedDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnRequestedDelivaryDate" msprop:Generator_ColumnPropNameInTable="RequestedDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="PlannedDelivaryDate" msprop:Generator_UserColumnName="PlannedDelivaryDate" msprop:Generator_ColumnPropNameInRow="PlannedDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnPlannedDelivaryDate" msprop:Generator_ColumnPropNameInTable="PlannedDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ActualDelivaryDate" msprop:Generator_UserColumnName="ActualDelivaryDate" msprop:Generator_ColumnPropNameInRow="ActualDelivaryDate" msprop:Generator_ColumnVarNameInTable="columnActualDelivaryDate" msprop:Generator_ColumnPropNameInTable="ActualDelivaryDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CustomerPriority" msprop:Generator_UserColumnName="CustomerPriority" msprop:Generator_ColumnPropNameInRow="CustomerPriority" msprop:Generator_ColumnVarNameInTable="columnCustomerPriority" msprop:Generator_ColumnPropNameInTable="CustomerPriorityColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Remarks" msprop:Generator_UserColumnName="Remarks" msprop:Generator_ColumnPropNameInRow="Remarks" msprop:Generator_ColumnVarNameInTable="columnRemarks" msprop:Generator_ColumnPropNameInTable="RemarksColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerId" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContractorId" msprop:Generator_UserColumnName="ContractorId" msprop:Generator_ColumnPropNameInRow="ContractorId" msprop:Generator_ColumnVarNameInTable="columnContractorId" msprop:Generator_ColumnPropNameInTable="ContractorIdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="logTbl" msprop:Generator_UserTableName="logTbl" msprop:Generator_RowDeletedName="logTblRowDeleted" msprop:Generator_RowChangedName="logTblRowChanged" msprop:Generator_RowClassName="logTblRow" msprop:Generator_RowChangingName="logTblRowChanging" msprop:Generator_RowEvArgName="logTblRowChangeEvent" msprop:Generator_RowEvHandlerName="logTblRowChangeEventHandler" msprop:Generator_TableClassName="logTblDataTable" msprop:Generator_TableVarName="tablelogTbl" msprop:Generator_RowDeletingName="logTblRowDeleting" msprop:Generator_TablePropName="logTbl">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Message" msprop:Generator_UserColumnName="Message" msprop:Generator_ColumnVarNameInTable="columnMessage" msprop:Generator_ColumnPropNameInRow="Message" msprop:Generator_ColumnPropNameInTable="MessageColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="timeReceived" msprop:Generator_UserColumnName="timeReceived" msprop:Generator_ColumnVarNameInTable="columntimeReceived" msprop:Generator_ColumnPropNameInRow="timeReceived" msprop:Generator_ColumnPropNameInTable="timeReceivedColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Idx" msprop:Generator_UserColumnName="Idx" msprop:Generator_ColumnVarNameInTable="columnIdx" msprop:Generator_ColumnPropNameInRow="Idx" msprop:Generator_ColumnPropNameInTable="IdxColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TableCanceledWo" msprop:Generator_UserTableName="TableCanceledWo" msprop:Generator_RowDeletedName="TableCanceledWoRowDeleted" msprop:Generator_RowChangedName="TableCanceledWoRowChanged" msprop:Generator_RowClassName="TableCanceledWoRow" msprop:Generator_RowChangingName="TableCanceledWoRowChanging" msprop:Generator_RowEvArgName="TableCanceledWoRowChangeEvent" msprop:Generator_RowEvHandlerName="TableCanceledWoRowChangeEventHandler" msprop:Generator_TableClassName="TableCanceledWoDataTable" msprop:Generator_TableVarName="tableTableCanceledWo" msprop:Generator_RowDeletingName="TableCanceledWoRowDeleting" msprop:Generator_TablePropName="TableCanceledWo">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ContractorId" msprop:Generator_UserColumnName="ContractorId" msprop:Generator_ColumnVarNameInTable="columnContractorId" msprop:Generator_ColumnPropNameInRow="ContractorId" msprop:Generator_ColumnPropNameInTable="ContractorIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="OrganizationName" msprop:Generator_UserColumnName="OrganizationName" msprop:Generator_ColumnVarNameInTable="columnOrganizationName" msprop:Generator_ColumnPropNameInRow="OrganizationName" msprop:Generator_ColumnPropNameInTable="OrganizationNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CanceledWo" msdata:ReadOnly="true" msprop:Generator_UserColumnName="CanceledWo" msprop:Generator_ColumnVarNameInTable="columnCanceledWo" msprop:Generator_ColumnPropNameInRow="CanceledWo" msprop:Generator_ColumnPropNameInTable="CanceledWoColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CountWo" msdata:ReadOnly="true" msprop:Generator_UserColumnName="CountWo" msprop:Generator_ColumnVarNameInTable="columnCountWo" msprop:Generator_ColumnPropNameInRow="CountWo" msprop:Generator_ColumnPropNameInTable="CountWoColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CanceledWoQunatity" msdata:ReadOnly="true" msprop:Generator_UserColumnName="CanceledWoQunatity" msprop:Generator_ColumnPropNameInRow="CanceledWoQunatity" msprop:Generator_ColumnVarNameInTable="columnCanceledWoQunatity" msprop:Generator_ColumnPropNameInTable="CanceledWoQunatityColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SunOfQuantity" msdata:ReadOnly="true" msprop:Generator_UserColumnName="SunOfQuantity" msprop:Generator_ColumnPropNameInRow="SunOfQuantity" msprop:Generator_ColumnVarNameInTable="columnSunOfQuantity" msprop:Generator_ColumnPropNameInTable="SunOfQuantityColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:logTbl" />
      <xs:field xpath="mstns:Idx" />
    </xs:unique>
  </xs:element>
</xs:schema>